/*
package com.jpx.jxcpay.task;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.jpx.jxc.pay.alibaba.qrcode.service.AlibabapayQrCodeService;
import com.jpx.jxcpay.entity.Alipayorder;
import com.jpx.jxcpay.service.IAlipayorderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
@Slf4j
public class OrderTask {

    @Autowired
    AlibabapayQrCodeService alibabapayQrCodeService;

    @Autowired
    IAlipayorderService iAlipayorderService;

    */
/**
     * 处理调单
     *//*

    @Scheduled(cron = "0/10 * * * * ?")
    @Async
    public void order(){
         //生成wrapper对象
        Wrapper wrapper = new EntityWrapper();
        //查询所有list集合
        List<Alipayorder> list = iAlipayorderService.selectList(wrapper);
        //遍历所有的订单集合
        for(Alipayorder alipay: list){
            //查询状态为支付一半或者未支付的
           if(alipay.getTrade().equals("WAIT_BUYER_PAY")||alipay.getTrade().equals("NOT_PAY")){
               //更改状态
               alipay.setTrade("TRADE_SUCCESS");
               //修改支付状态
               iAlipayorderService.update(alipay,wrapper);
               log.info("定时调单修复完毕");
           }
        }
    }






}
*/
